import request from '@/utils/request'
// 获取组织架构部门列表
export function getDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 添加功能
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据 id 获取部门联系人详情
export function getDepartmentById(id) {
  return request({
    method: 'get',
    url: '/company/department/' + id
  })
}
// 编辑更新数据的接口
export function updateDepartmentById(data) {
  return request({
    method: 'put',
    url: '/company/department/' + data.id,
    data
  })
}
// 根据 id 删除部门
export function deleteDepartmentById(id) {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}
